<div class="tabs-wrapper">
    <form th:action="@{/admin/edit/}" class="form-horizontal" method="post" th:object="${admin}">
        <div th:replace="widget::inputField('账号名称','name',${admin.name})"></div>
        <input type="hidden" th:field="*{id}" />
        <div class="form-group" th:with="selectRole=${#strings.arraySplit(admin.roleId,',')}">
            <label class="col-sm-2 control-label"}>角色名称</label>
            <div class="col-sm-10" th:insert="widget::selectMultiple('roleId','请选择角色', ${roleList}, ${selectRole})"></div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">账号密码</label>
            <div class="col-sm-10">
                <input type="password" th:field="*{password}" class="form-control"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">确认密码</label>
            <div class="col-sm-10">
                <input type="password" name="confirmPassword" , class="form-control" value=""/>
            </div>
        </div>
        <div th:replace="widget::inputField('真实姓名','realName',${admin.realName})"></div>
        <div class="form-group">
            <label class="col-sm-2 control-label">状态</label>
            <div class="col-sm-10 col-xs-4" th:insert="widget::checkbox('status','是否有效','status', ${admin.status})">

            </div>
        </div>
    </form>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        $('.selectpicker').off().selectpicker('render');
    });
</script>